<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>出入库信息管理</title>
<meta name="decorator" content="default" />
<style type="text/css">		
	#tab td ,#tab th{
		text-align: center;
	}
	.minWidth {
		min-width: 177px;
	}	
</style>
<script src="${ctxStatic}/common/format/formatOrderData.js"></script>
<script src="${ctxStatic}/js/LodopFuncs.js"></script>
<script type="text/javascript">
	$(function() {
		$("#btnPrint").click(function(){
			window.open("${ctx}/order/bsVaccineOrderHL/print?id=${bsVaccineOrder.id}", "_blank");
		});
	});
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a>疫苗订单信息</a></li>
	</ul>
	<form:form id="inputForm" modelAttribute="bsVaccineOrder"
		action="${ctx}/order/bsVaccineOrder/veiwForm?id=${bsVaccineOrder.id}" method="post"
		class="form-horizontal">
		<form:hidden path="id" />
		<input id="receiveorgcode" type="hidden" name="receiveorgcode" value="${bsVaccineOrder.receiveorgcode}">
		<sys:message content="${message}" />
		<div class="row-fluid tools">
			<div class="control-group span6 minWidth secondChild">
				<label class="control-label">订单号：</label>
				<div class="controls">
					<form:input path="orderNo" htmlEscape="false" maxlength="50"
						readonly="true" class="span6" />
				</div>
			</div>
			<div class="control-group span6 minWidth">
				<label class="control-label">订单状态：</label>
				<div class="controls">
					<form:select path="orderStatus"  readonly="true" disabled="true" class="span6 required ordertype">
						<form:options items="${fns:getDictList('hl_order_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
					<%-- <form:input path="orderStatus" htmlEscape="false"
						value='${fns:getDictLabel(bsVaccineOrder.orderStatus, "bs_order_status", "")}'
						readonly="true" itemLabel="label" itemValue="value" class="span6 receive required" /> --%>
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="control-group span6">
				<label class="control-label">出库日期：</label>
				<div class="controls">
					<input name="outboundDate" type="text" readonly="readonly"
						disabled maxlength="20" class="span6 Wdate required"
						value="<fmt:formatDate value="${bsVaccineOrder.outboundDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});" />
				</div>
			</div>
			<div class="control-group span6 minWidth secondChild">
				<label class="control-label">类型：</label>
				<div class="controls">
					<form:select path="orderType"  readonly="true" disabled="true" class="span6 required ordertype">
						<form:options items="${fns:getDictList('hl_inout_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</div>
			</div>
		</div>
		<c:if test="${bsVaccineOrder.orderType!=2}">
		<div class="row-fluid tools">
			<div class="control-group span6 minWidth">
				<label class="control-label">供货单位：</label>
				<div class="controls">
					<form:input path="supplyorgName" htmlEscape="false"
						maxlength="255" readonly="true" class="span6 required" />
				</div>
			</div>
			<div class="control-group span6 minWidth secondChild">
				<label class="control-label">供货单位经手人：</label>
				<div class="controls">
					<form:input path="consignorName" htmlEscape="false" maxlength="50"
						readonly="true" class="span6 required" />
				</div>
			</div>
		</div>
		<div class="row-fluid tools">
			<div class="control-group span6 minWidth">
				<label class="control-label">收货单位：</label>
				<div class="controls">
					<form:input path="receiveorgName" htmlEscape="false"
						readonly="true" maxlength="255" class="span6 receive required" />
				</div>
			</div>
			<div class="control-group span6 minWidth secondChild">
				<label class="control-label">收货单位经手人：</label>
				<div class="controls">
					<form:input path="consigneeName" htmlEscape="false" maxlength="50"
						readonly="true" class="span6" />
				</div>
			</div>
		</div>
		<div class="row-fluid  tools">
			<div class="control-group span6 minWidth ">
				<label class="control-label">疫苗运输工具：</label>
				<div class="controls">
					<form:radiobuttons path="transportation" readonly="true"
						disabled="true"
						items="${fns:getDictList('bs_order_transportation')}"
						itemLabel="label" itemValue="value" class="required trantype" />
					<form:input path="otherTransportation" readonly="true"
						htmlEscape="false" maxlength="50" class="input-mini traninput" />
				</div>
			</div>
			<div class="control-group span6 minWidth secondChild">
				<label class="control-label">疫苗冷藏方式：</label>
				<div class="controls">
					<form:radiobuttons path="refrigeratetype" readonly="true"
						disabled="true"
						items="${fns:getDictList('bs_order_refrigeratetype')}"
						itemLabel="label" itemValue="value" class="required reftype" />
					<form:input path="otherRefrigeratetype" readonly="true"
						htmlEscape="false" maxlength="50" class="input-mini refinput" />
				</div>
			</div>
		</div>
		</c:if>
		<div class="control-group">
			<label class="control-label">备注信息：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="3"
					readonly="true" style="width: 78%;resize: vertical;"
					maxlength="255" class="input-xlarge" />
			</div>
		</div>

		<div class="control-group table">
			<table id="tab" class="table  table-bordered table-condensed">
				<thead>
					<tr>
						<th>疫苗名称/注射器类型</th>
						<th>疫苗属性</th>
						<th>疫苗生产企业</th>
						<th>批号</th>
						<th>规格(剂/支或粒)</th>
						<th>剂型</th>
						<th>剂量</th>
						<th>有效日期</th>
						<th>数量</th>
					</tr>
				</thead>
				<tbody id="check" class="table_content">
					<c:forEach items="${bsVaccineOrderDetailList}" var="bsVaccineOrderDetail">
						<tr>
							<c:if test="${bsVaccineOrderDetail.ITEMTYPE==2}">
								<td>${fns:getDictLabel(bsVaccineOrderDetail.INJECTORTYPE, "batch_syringe_type", "")}</td>
								<td>${fns:getDictLabel(bsVaccineOrderDetail.INJECTORPROPERTY, "bs_vaccine_type", "")}</td>
								<td>${bsVaccineOrderDetail.INJECTORMANUFACTURER}</td>
								<td>${bsVaccineOrderDetail.INJECTORBATCHNUMBER}</td>
								<fmt:formatNumber var="c" value="${bsVaccineOrderDetail.INJECTORSPECIFICATION}" pattern="#"/>
								<td>${fns:getDictLabel(c, "syringe_spec", "")}</td>
								<td></td>
								<td>${bsVaccineOrderDetail.INJECTORDOSAGE}</td>
								<td><fmt:formatDate value="${bsVaccineOrderDetail.INJECTOREXPIRATIONDATE}" pattern="yyyy-MM-dd"/></td>
								<td>${bsVaccineOrderDetail.AMOUNT}</td>
							</c:if>
							<c:if test="${bsVaccineOrderDetail.ITEMTYPE==1}">
								<td>${bsVaccineOrderDetail.VACCINENAME}</td>
								<td>${fns:getDictLabel(bsVaccineOrderDetail.VACCINEPROPERTY, "bs_vaccine_type", "")}</td>
								<td>${bsVaccineOrderDetail.MANUFACTURER}</td>
								<td>${bsVaccineOrderDetail.BATCHNUMBER}</td>
								<td>${bsVaccineOrderDetail.SPECIFICATION}</td>
								<td>${fns:getDictLabel(bsVaccineOrderDetail.DOSEFORM, "hl_dose_form", "")}</td>
								<td>${bsVaccineOrderDetail.DOSAGE}</td>
								<td><fmt:formatDate value="${bsVaccineOrderDetail.EXPIRATIONDATE}" pattern="yyyy-MM-dd"/></td>
								<td>${bsVaccineOrderDetail.AMOUNT}</td>
							</c:if>
							
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
		<div class="form-actions">
			<button id="btnPrint" class="btn btn-primary" type="button" >打印</button>
			<button id="btnCancel" class="btn btn-primary" type="button" onclick="history.go(-1)">返 回</button>
		</div>
	</form:form>
</body>
</html>